﻿using System;
using System.IO;

namespace PrismGuidancePackage.Views.Services
{
    public class FileSystemService : IFileSystemService
    {
        /// <summary>
        /// Checks that the given pathes exists in the file system.
        /// </summary>
        /// <param name="path">The path.</param>
        /// <returns></returns>
        public bool PathExists(string path)
        {
            if (!string.IsNullOrEmpty(path))
            {
                return Directory.Exists(path);
            }
            return false;
        }

        /// <summary>
        /// Checks that the given file exists in the file system.
        /// </summary>
        /// <param name="file">The file.</param>
        public bool FileExists(string file)
        {
            if (!string.IsNullOrEmpty(file))
            {
                return File.Exists(file);
            }
            return false;
        }
    }
}